const express = require('express')
const router = express.Router()
const path = require('path')


// 获取验证模块
const authorization = require(path.join(process.cwd(), '/modules/authorization'))

// 获取验证模块服务
const menuService = require(path.join(process.cwd(), '/services/MenuService'))


router.get('/', function (req, res, next) {
    const reqUserInfo = req.userInfo
    menuService.getLeftMenus(reqUserInfo, (err,result) => {
        if (err) return res.sendResult(null, 404, err)
         return  res.sendResult(result, 200, '获取菜单成功')
    })
})

module.exports = router